<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
	    String path = request.getContextPath();
	    String basePath = request.getScheme() + "://" + request.getServerName() + ":"
	            + request.getServerPort() + path + "/";
	%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>list</title>
<link href="<%=path%>/css/main.css" type="text/css" rel="stylesheet"/>
<link href="<%=path%>/css/jquery.jmodal.css" rel="stylesheet" type="text/css" charset="utf-8"/>

<script language="JavaScript" src="jUnit.js" type="text/JavaScript" charset="utf-8"></script>
 <script language="JavaScript" src="<%=path%>/js/jquery-1.3.1.min.js" type="text/JavaScript"  charset="utf-8"></script>
    <script language="JavaScript" src="<%=path%>/js/jquery.jmodal.js" type="text/JavaScript"  charset="utf-8"></script>
     <script language="JavaScript" src="role.js" type="text/JavaScript"  charset="utf-8"></script>
       
</head>
<style type="text/css">
	
	.viewList { 
		margin-top:0px;
		line-height:28px;
		border:0px; 
		border-collapse:collapse; 
		padding:0; 
		text-align:center;
	}
</style>
<body>
<f:view>
<h:form id="functionForm">
   <h:inputHidden id="searchTag" value="#{functionBean.searchTag}" />
<div class="cont2">
  <div class="table2">
   <div class="title1Bg">
      <div class="title1 f14"><strong>功能查询</strong><span class="f12 fright"><h:commandLink action="#{functionBean.search}"
										styleClass="buts but2" value="查询">
										<f:param name="searchFlag" value="isListSearch"></f:param>
									</h:commandLink>
									<a href="##" onclick="javascript:searchReset()" class="buts but3">重置</a></span></div>
    </div>
    <div class="cont3Bg">
      <div class="cont3Bg2">
        <table border="0" cellpadding="0" cellspacing="0" class="cont3">
          <tr>
          <td align="left" width=200 class="f14">功能编号:</td>
          <td > <h:inputText id="funcCode"  size="30" value="#{functionBean.funcCode}"/>
		  </td>
		   <td align="left" width=200 class="f14">功能名称:</td>
          <td > <h:inputText id="name"  size="30" value="#{functionBean.funName}" />
		  </td>
          </tr>
          <tr>
            <td colspan="4" class="td1" height="1"></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <div class="table1">
    <div class="title1Bg">
      <div class="title1 f14"><strong> 功能列表</strong><span class="f12 fright"> <h:inputHidden id="recordCount" value="#{functionBean.recordCount}" />
                              <h:inputHidden id="pageCount" value="#{functionBean.pageCount}" />
                              <h:inputHidden id="previousPage" value="#{functionBean.previousPage}" />
                              <h:inputHidden id="nextPage" value="#{functionBean.nextPage}" />
									共
									<h:outputText value="#{functionBean.recordCount}" />
									条记录  |  每页显示
									<h:inputText id="pageRecord"
										value="#{functionBean.pageRecord}" size="1" />
									条
									
          
        </span></div>
    </div>
    <table cellpadding="0" cellspacing="0" width="100%">
 
     <h:dataTable binding="#{functionBean.TData}"
                                        value="#{functionBean.items}" var="item"
                                        headerClass="dataTableHead" columnClasses="dataTableTD"
                                        styleClass="viewList">
                                                <h:column> 
         <f:facet name="header"><h:outputText value=""/></f:facet> 
             <h:selectBooleanCheckbox id="checked" binding="#{functionBean.selected}" /> 
     </h:column> 
     <h:column> 
         <f:facet name="header"><h:outputText value="功能编号"/></f:facet> 
         <h:outputText value="#{item.funcCode}"/>
     </h:column>  
     <h:column> 
         <f:facet name="header"><h:outputText value="功能名称"/></f:facet> 
         <h:outputText value="#{item.name}"/>
     </h:column>  
      <h:column> 
         <f:facet name="header"><h:outputText value="功能页面"/></f:facet> 
         <h:outputText value="#{item.pageUrl}"/>
     </h:column> 
 <h:column> 
         <f:facet name="header"><h:outputText value="功能层级"/></f:facet> 
         <h:outputText value="#{item.funcLevel}"/>
     </h:column> 
               <h:column>
												<f:facet name="header">
													<h:outputText value="功能状态" />
												</f:facet>
												<h:outputText value="#{item.funStatus}" />
											</h:column>
											<h:column>
												<f:facet name="header">
													<h:outputText value="父功能菜单 " />
												</f:facet>
												<h:outputText value="#{item.fatherFunCode}" />
											</h:column>
											<h:column>
												<f:facet name="header">
													<h:outputText value="对于父级的排序" />
												</f:facet>
												<h:outputText value="#{item.funOrder}" />
											</h:column>
											<h:column>
												<f:facet name="header">
													<h:outputText value="是否有子菜单" />
												</f:facet>
												<h:outputText value="#{item.hasChild}" />
											</h:column>
                                  </h:dataTable>
    </table>
    <div class="bottomBg">
      <div class="bottom">
        <div class="page green"><h:commandLink action="#{functionBean.search}" value="首页">
                                        <f:param name="newCurrentPage" value="1"></f:param>
                                        <f:param name="queryFlag" value="ispage"></f:param>
                                    </h:commandLink>
									<h:commandLink action="#{functionBean.search}" value="上一页">
										<f:param name="newCurrentPage"
											value="#{functionBean.previousPage}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									&nbsp;
									<h:commandLink action="#{functionBean.search}" value="下一页>>">
										<f:param name="newCurrentPage"
											value="#{functionBean.nextPage}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink>
									&nbsp;
									<h:commandLink action="#{functionBean.search}" value="末页>>">
										<f:param name="newCurrentPage"
											value="#{functionBean.pageCount}"></f:param>
										<f:param name="queryFlag" value="ispage"></f:param>
									</h:commandLink></div>
   <h:commandLink value="添加" styleClass="buts but4"
											action="#{functionBean.preAdd}" rendered="#{functionBean.magFlag  eq 1}"/>
        <h:commandLink value="修改" styleClass="buts but5"
											action="#{functionBean.preUpdate}"
											onmousedown="return check_updMultiBox(this);" rendered="#{functionBean.magFlag  eq 1}"/>       
        <h:commandLink value="删除" styleClass="buts but6"
											action="#{functionBean.delete}"
											onmousedown="return deletes(this);" rendered="#{functionBean.magFlag  eq 1}"/>
      </div>
   </div>
</div>
</div>
	</h:form>
		</f:view>
</body>
</html>

<script language="javascript">
function searchReset()
{

	$("#functionForm\\:funcCode").val("");
	$("#functionForm\\:name").val("");
}
</script>